package com.liusand.mapper;

import com.liusand.pojo.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author :liusha
 * packageName :com.liusand.mapper
 * fileName :EmployeeMapper
 * creationTime :2022/11/20 19:40
 */
@Mapper
public interface EmployeeMapper {
    Employee findByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    List<Employee> page(@Param("name") String name,@Param("start") Integer start,@Param("pageSize") Integer pageSize);

    long countPage(@Param("name") String name);

    Employee findEmployeeById(@Param("id") String id);

    int saveEmployee(Employee employee);

    int updateEmployee(Employee employee);

    Employee findEmployeeByUsername(@Param("username") String username);

}
